Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

HTTP web server & other enhancements #31

Merged
merged 5 commits into from
Aug 27, 2015

Conversation

brody4hire
Copy link

As discussed in #28, here are some enhancements to add HTTP server support. I used the web socket components as a starting point, to get something working based on the tutorial at: http://blog.modulus.io/build-your-first-http-server-in-nodejs

One major difference from the web socket code is that I put the listening code in its own fiber and use some internal queueing, so that each fiber done() callback object is only triggered once. I think this is significantly cleaner and less implementation-dependent, if not any more correct. I may propose similar enhancements for the web socket code.

Another observation is that in newer JS FBP implementations, it is possible to send a connection object that can be used to send a response in another stage. What this means is that we really only need a HTTP server listener component in the library.

There are also a couple of bug fixes that I originally proposed in PR #30:

  • get the collate fields from the ctlfields IP before dropping it
  • dropIP on the wss IP was missing in examples/websocketchat/wsbroadcast.js

jpaulm added a commit that referenced this pull request Aug 27, 2015
@jpaulm jpaulm merged commit a75fc8b into jpaulm:master Aug 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants